package UIComponents// ActionScript file
{
	import Classes.GameUtils.MyTipSprite;
	import Classes.GameUtils.ToolTip_Sprite;
	
	import flash.display.DisplayObject;
	import flash.display.Sprite;

	public class IconContainer extends Sprite
	{
		public function IconContainer():void
		{
			
		}
		
		public function addPic(pic:DisplayObject,tips:String=""):void
		{
			this.reset();
			if(pic)this.addChild(pic);
			if(pic && ""!=tips)
			{
				ToolTip_Sprite.getInstance().setTip(this,new MyTipSprite(tips),ToolTip_Sprite.DIRECTION_LEFT);
			}
		}
		
		public function reset():void
		{
			while(this.numChildren)this.removeChildAt(0);
		}
	}
}